import Vue from "vue"
import VueRouter from "vue-router"

import Recommend from "../pages/Recommend"
import PerTailor from "../pages/PerTailor"
import ProgramDetails from "../pages/PerTailor/ProgramDetails"

import LoginRegister from "../pages/LoginRegister"
import Login from "../pages/LoginRegister/Login"
import Register from "../pages/LoginRegister/Register"

import Mine from "../pages/Mine"
import Getphyscoord from "../components/Getphyscoord"
import Search from "../pages/Recommend/Search"
import AttractionsTopics from "../pages/Recommend/AttractionsTopics"
import quickMenu from "../pages/Recommend/quickMenu"
import Recomspots from "../pages/Recommend/quickMenu/Recomspots"
import Recomhotel from "../pages/Recommend/quickMenu/Recomhotel"
import Recomfood from "../pages/Recommend/quickMenu/Recomfood"
import Recomdonkey from "../pages/Recommend/quickMenu/Recomdonkey"


import Settings from "../pages/Mine/Settings"
import ChangePwd from "../pages/Mine/Settings/ChangePwd"
import Privacy from "../pages/Mine/Settings/Privacy"
import ForUs from "../pages/Mine/Settings/ForUs"
import MsgReminding from "../pages/Mine/Settings/MsgReminding"


import Concern from "../pages/Mine/Concern"
import HomePage from "../pages/Mine/HomePage"
import ModifiedData from "../pages/Mine/ModifiedData"
import ZyCoin from "../pages/Mine/ZyCoin"
import Feedback from "../pages/Mine/Feedback"
import Myfeedback from "../pages/Mine/Feedback/Myfeedback"
import MyCollect from "../pages/Mine/MyCollect"
import MyFans from "../pages/Mine/MyFans"
import ChangeRecord from "../pages/Mine/ZyCoin/ChangeRecord";
import GainZyCoin from "../pages/Mine/ZyCoin/GainZyCoin";
import ZyMall from "../pages/Mine/ZyCoin/ZyMall";
import Customization from "../pages/Mine/Customization"
import TravelProgram from "../pages/PerTailor/TravelProgram"


Vue.use(VueRouter);

export default new VueRouter({
    // mode: "history",
    routes: [
        {
            path: '/recommend',
            component: Recommend,
            meta: {
                showFooter: true
            }
        },
        {
            path: '/pertailor',
            component: PerTailor,
            meta: {
                showFooter: true
            },
        },

        {
            path: '/mine',
            component: Mine,
            meta: {
                showFooter: true
            }
        },
        {path: "/getphyscoord", component: Getphyscoord},
        {path: "/search", component: Search},
        {path: "/attractionstopics", component: AttractionsTopics},
        {
            path: "/quickmenu",
            component: quickMenu,
            children: [
                {
                    path: '/',  //代表 /routerChildren
                    name: "quickMenu",
                    meta: {
                        showFooter: true
                    },
                    redirect: '/quickmenu/recomspots' //当我们访问存在子路由的页面时，重定向为第一个子路由，切记，如果写了component，那么这个component也将显示
                },
                {
                    path: '/quickmenu/recomspots',
                    component: Recomspots,
                },
                {
                    path: '/quickmenu/recomhotel',
                    component: Recomhotel,
                },
                {
                    path: '/quickmenu/recomfood',
                    component: Recomfood,
                },
            ]
        },
        {
            path: '/recomdonkey',
            component: Recomdonkey,
        },
        //.............................
        {
            path: '/settings',
            component: Settings,
        },
        {
            path: '/changepwd',
            component: ChangePwd,
        },
        {
            path: '/forus',
            component: ForUs,
        },
        {
            path: '/msgreminding',
            component: MsgReminding,
        },
        {
            path: '/privacy',
            component: Privacy,
        },

        //................................
        {
            path: '/concern',
            component: Concern,
        },
        {
            path: '/homepage',
            component: HomePage,
        },
        {
            path: '/modifieddata',
            component: ModifiedData,
        },
        {
            path: "/zycoin",
            component: ZyCoin,
            children: [
                {path: "/", redirect: "/gainzycoin"},
                {
                    path: "/changerecord",
                    component: ChangeRecord
                },
                {
                    path: "/gainzycoin",
                    component: GainZyCoin
                },
                {
                    path: "/zymall",
                    component: ZyMall
                }
            ]
        },
        {
            path: '/feedback',
            component: Feedback,
        },
        {
            path: '/myfeedback',
            component: Myfeedback,
        },
        {
            path: '/mycollect',
            component: MyCollect,
        },
        {
            path: '/myfans',
            component: MyFans,
        },
        {

            path: '/loginregister',
            component: LoginRegister,
            children: [
                {
                    path: '/',  //代表 /routerChildren
                    redirect: '/login' //当我们访问存在子路由的页面时，重定向为第一个子路由，切记，如果写了component，那么这个component也将显示
                },
                {
                    path: '/login',
                    component: Login,
                    meta: {
                        isLogin: false
                    }
                },
                {
                    path: '/register',
                    component: Register,
                    meta: {
                        isLogin: false
                    }
                },
            ]
        },
        {
            path: '/customization',
            component: Customization,
        },
        {
            path: '/travelprogram',
            component: TravelProgram,
        },
        {
            path: "/programdetails",
            component: ProgramDetails
        },
        {path: '/', redirect: "/recommend"}
    ]
})

